home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 October / Ahoy_Magazine_85-10_1985_Double_L.d64 / error checker (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  54 lines

  1. 100 rem george trepal copyright 1985
  2. 110 rem 2650 alturas rd
  3. 120 rem bartow, fl   33830
  4. 130 clr:poke53281,0:poke53280,0:dimtr(40):print"[147][153]"
  5. 140 printspc(11)"disk error checker"
  6. 150 printspc(8)"[158]no knock -- tracks 1-40"
  7. 160 printspc(12)"[159]by george trepal"
  8. 170 print"[153]check <a>ll tracks or <s>elected tracks"
  9. 180 gety$:ify$<>"a"andy$<>"s"then180
  10. 190 ify$="a"thenft=1:lt=40:goto260
  11. 200 ft=-1:lt=50
  12. 210 input"        first track to check";ft
  13. 220 ifft<1orft>40then210
  14. 230 input"        last track to check";lt
  15. 240 iflt<1orlt>40then230
  16. 250 iflt<ftthen210
  17. 260 printspc(5)"print out errors found (y/n)?"
  18. 270 gety$:ify$<>""then270
  19. 280 pf=0:gety$:ify$=""then280
  20. 290 ify$="y"thenpf=1
  21. 300 print" insert disk to check then press return"
  22. 310 print spc(2)"(flashing [150]red[153] drive light is normal)"
  23. 320 geta$:ifa$<>chr$(13)then320
  24. 330 open15,8,15:print#15,"i":close15
  25. 340 rem define # of sectors on tracks
  26. 350 forj=1to17:tr(j)=20:next:forj=18to23:tr(j)=18:next
  27. 360 forj=24to30:tr(j)=17:next:forj=31to40:tr(j)=16:next
  28. 370 fort=fttolt:print"[147]";:printspc(15)"track ";t
  29. 380 print"[153]   sector    error     explanation"
  30. 390 fors=0totr(t)
  31. 400 print"[153]sector # ";s;:ifs<10thenprint" ";
  32. 410 open15,8,15
  33. 420 print#15,"m-w"chr$(6)chr$(0)chr$(2)chr$(t)chr$(s)
  34. 430 print#15,"m-w"chr$(0)chr$(0)chr$(1)chr$(128)
  35. 440 print#15,"m-r"chr$(0)chr$(0)
  36. 450 get#15,a$:a=asc(a$+chr$(0)):ifa>99then440
  37. 460 ifa=1thenprint" no errors":goto550
  38. 470 ifa=2thenb$="[158]block header gone"
  39. 480 ifa=3thenb$="[159]sync character gone"
  40. 490 ifa=4thenb$="[154]header checksum bad"
  41. 500 ifa=5thenb$="[156]read checksum bad"
  42. 510 ifa=6thenb$="bit pattern error"
  43. 520 ifa=9thenb$="header checksum bad"
  44. 530 ifa=11thenb$="[129]format id mismatch"
  45. 540 print" ";a+18;" ";b$
  46. 550 close15
  47. 560 ifpf=0ora=1then590
  48. 570 open4,4:cmd4:print#4,"track ";t;"   sector";s;"  error #";a+18;
  49. 580 print#4,"    ";b$:close4
  50. 590 next:next
  51. 600 printspc(8)"press return to continue[153]"
  52. 610 gety$:ify$<>chr$(13)then610
  53. 620 goto130
  54.